package com.zhuanzhuan.hero.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bj58.zhuanzhuan.zzentry.common.service.entity.ServiceHeaderEntity;
import com.zhuanzhuan.hero.user.dto.UserContactDTO;
import com.zhuanzhuan.hero.user.entity.HeroUserContact;
import com.zhuanzhuan.hero.user.pojo.bo.QueryContactParam;
import com.zhuanzhuan.hero.user.vo.UserStoreVO;

import java.util.List;

/**
 * dal Interface:HeroUserContact
 * @author hanjunjun
 * @date 2024-6-17
 */
public interface HeroUserContactService extends IService<HeroUserContact> {

    /**
     * 注册时初始化
     *
     * @param uid
     * @param mobile
     * @param nickname
     * @param profilePhoto
     * @return java.lang.Long
     * @author  hanjunjun
     * @date 2024/6/19
     **/
    Long registInitUserContactInfo(Long uid, String mobile, String nickname, String profilePhoto);

    /**
     * 根据uid查询
     *
     * @param uid
     * @return com.zhaunzhuan.hero.user.vo.UserContactVO
     * @author  hanjunjun
     * @date 2024/6/20
     **/
    UserContactDTO queryUserContactByUid(Long uid);

    /**
     * 多参数查询
     *
     * @param param
     * @return java.util.List<com.zhuanzhuan.hero.user.entity.HeroUserContact>
     * @author  hanjunjun
     * @date 2024/7/22
     **/
    List<HeroUserContact> listByParam(QueryContactParam param);

    /**
     * 保存联系方式
     *
     * @param uid
     * @param userContactDTO
     * @param header  风控使用
     * @return void
     * @author  hanjunjun
     * @date 2024/6/21
     **/
    void updateUserContact(long uid, UserContactDTO userContactDTO, ServiceHeaderEntity header);

    /**
     * 查询店铺信息
     *  目前只返回了照片
     * @param targetUid
     * @return com.zhaunzhuan.hero.user.dto.UserContactDTO.StoreInfo
     * @author  hanjunjun
     * @date 2024/6/21
     **/
    UserStoreVO queryUserStore(Long targetUid);

    /**
     * 风控失败处理
     *
     * @param uid
     * @param rejectFields
     * @return boolean
     * @author  hanjunjun
     * @date 2024/6/22
     **/
    boolean riskcontrolFail(Long uid, List<String> rejectFields);

    HeroUserContact getByUid(Long uid);

    List<HeroUserContact> listByUid(List<Long> uids);

    boolean delByUid(Long uid);

    Long createHeroUserContact(HeroUserContact record);

    boolean contactInfoIsPerfection(Long uid, HeroUserContact userContact);
}